package com.jdd.modules.sdk.ledcall;

import com.jdd.common.constant.JddConstant;
import com.jdd.common.constant.LedConstant;
import com.jdd.common.util.DateUtils;
import com.jdd.modules.sdk.LedCallInterface;
import com.jdd.modules.sdk.SdkCallInterface;
import com.jdd.modules.sdkidentifyresultpushlog.entity.DiscountCouponDetail;
import com.jdd.modules.sdkidentifyresultpushlog.entity.ParkOrderInfoVO;
import org.apache.commons.lang3.StringUtils;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.Date;

/**
 * @author ：jdd孙庆伟
 * @date ：Created in 2021/9/10 17:10
 * @description：菲利德控制板
 * @modified By：`
 * @version: 1.0
 *         //2车牌，3时间，4收费
 */
@Component
@Lazy
public class YangZhongLaiBlueLedCallInterface extends LedCallInterface {

    @Resource
    private SdkCallInterface sdkCallInterface;

    /**
     * @return
     * @Description 无牌车入口显示播报
     * @author renshangyi
     * @Date 2021-11-17
     */
    @Override
    public void EntranceUnlicensed(String serialNo) {
        String str = "无牌车,请扫描屏上二维码";
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "无牌车", LedConstant.qyTwoLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "请扫描入口二维码", LedConstant.qyOneLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, str);
    }

    /**
     * @param serialNo
     * @return
     * @Description 白名单军警车入场播报
     * @author renshangyi
     * @Date 2021-11-17
     */
    @Override
    public void EntranceSpecial(String serialNo, String plateNo) {
        String str = plateNo+",欢迎光临";
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "欢迎光临", LedConstant.qyTwoLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, plateNo, LedConstant.qyOneLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, str);
        sdkCallInterface.SdkUnfoldAll(JddConstant.SdkOpenGateLog.SWICH_TYPE_ONE, serialNo, plateNo);
    }

    /**
     * @return void
     * @author renshangyi
     * @date 2021/11/17
     * @Description 白名单过期按照临时车 --弃用
     */
    @Override
    public void EntranceParkWhiteOver(String serialNo, String plateNo) {
        sdkCallInterface.SdkUnfoldAll(JddConstant.SdkOpenGateLog.SWICH_TYPE_ONE, serialNo, plateNo);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "车号已过期按照临时车收费", LedConstant.qyTwoLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, plateNo, LedConstant.qyOneLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, plateNo + "车号已过期,为临时车收费");
    }

    /**
     * @return void
     * @author renshangyi
     * @date 2021/11/17
     * @Description 月租车过期禁止进入
     */
    @Override
    public void BanMonthOver(String serialNo, String plateNo, Date endTime,String broadcastInfo) throws Exception {
        String str = "月卡车"+plateNo+"已过期,禁止入场";
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "月卡车过期禁止入场", LedConstant.qyTwoLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo,plateNo,LedConstant.qyOneLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, str);
    }

    /**
     * @return void
     * @author renshangyi
     * @date 2021/11/17
     * @Description 过期N天不可进入
     */
    @Override
    public void BanMonthOverDay(String serialNo, String plateNo, Date endTimes) throws Exception {
        String str = "月卡车"+plateNo+"已过期,禁止入场";
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "月卡车已过期禁止入场", LedConstant.qyTwoLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, plateNo, LedConstant.qyOneLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, str);
    }

    /**
     * @return void
     * @author renshangyi
     * @date 2021/11/17
     * @Description 过期N天内可进入
     */
    @Override
    public void EnranceMonthOverCan(String serialNo, String plateNo) {
        sdkCallInterface.SdkUnfoldAll(JddConstant.SdkOpenGateLog.SWICH_TYPE_ONE, serialNo, plateNo);
        String str = "月卡车"+plateNo+"已过期,为临时车收费";
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "月卡车"+plateNo+"已过期", LedConstant.qyTwoLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, plateNo, LedConstant.qyOneLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, str);
    }

    /**
     * @param serialNo
     * @return
     * @Description 月租车过期按照临时车收费播报
     * @author renshangyi
     * @Date 2021-11-17
     */
    @Override
    public void EntranceMonthlyOverdue(String serialNo, String plateNo) {
        sdkCallInterface.SdkUnfoldAll(JddConstant.SdkOpenGateLog.SWICH_TYPE_ONE, serialNo, plateNo);
        String str = "月卡车"+plateNo+"已过期,为临时车收费";
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "月卡车"+plateNo+"已过期", LedConstant.qyTwoLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, plateNo, LedConstant.qyOneLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, str);
    }

    /**
     * @param serialNo
     * @return
     * @Description 月租车入场播报
     * @author renshangyi
     * @Date 2021-11-17
     */
    @Override
    public void MonthlyEntrance(String serialNo, String plateNo,String broadcastInfo) {
        sdkCallInterface.SdkUnfoldAll(JddConstant.SdkOpenGateLog.SWICH_TYPE_ONE, serialNo, plateNo);
        String str = "月卡车," + plateNo + ",欢迎光临!";
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "月卡车"+plateNo, LedConstant.qyTwoLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "欢迎光临", LedConstant.qyOneLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, str);
    }

    /**
     * 月租车出场
     * @param serialNo
     * @param plateNo
     * @param broadcastInfo
     * @return
     * @author renshangyi
     * @date 2022/4/1
     */
    @Override
    public void outMonthlyEntrance(String serialNo, String plateNo, String broadcastInfo) {
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, broadcastInfo, LedConstant.qyTwoLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, plateNo, LedConstant.qyOneLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, broadcastInfo);
        sdkCallInterface.SdkUnfoldAll(JddConstant.SdkOpenGateLog.SWICH_TYPE_ONE, serialNo, plateNo);
    }

    /**
     * @param serialNo
     * @return
     * @Description 黑名单禁止通行播报 如果是黑名单并且iFBroadcast为false 则限制入场
     * @author renshangyi
     * @Date 2021-11-17
     */
    @Override
    public void EntranceBlacklist(String serialNo, String plateNo) {
        String str = plateNo + ",此车为黑名单车辆,禁止入场";
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "黑名单车辆禁止入场", LedConstant.qyTwoLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, plateNo, LedConstant.qyOneLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, str);
    }

    /**
     * @param serialNo
     * @return
     * @Description 禁行时间段内播报
     * @author renshangyi
     * @Date 2021-11-17
     */
    @Override
    public void JudgeStopDay(String serialNo, String plateNo) {
        String str = "该时段不允许进入,禁止入场";
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "该时段不允许进入", LedConstant.qyTwoLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, plateNo, LedConstant.qyOneLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, str);
    }

    /**
     * @return void
     * @author renshangyi
     * @date 2021/11/17
     * @Description 储值车配置自动开闸
     */
    @Override
    public void EntranceStoredInConfig(String serialNo, String plateNo) {
        sdkCallInterface.SdkUnfoldAll(JddConstant.SdkOpenGateLog.SWICH_TYPE_ONE, serialNo, plateNo);
        String str = "储值车," + plateNo + ",欢迎光临";
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "储值车"+plateNo, LedConstant.qyTwoLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "欢迎光临", LedConstant.qyOneLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, str);
    }

    /**
     * @return void
     * @author renshangyi
     * @date 2021/11/17
     * @Description 储值车配置手动开闸
     */
    @Override
    public void StoredInConfig(String serialNo, String plateNo) {
        String str = "请等待确认放行";
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, str, LedConstant.qyTwoLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, plateNo, LedConstant.qyOneLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, str);
    }

    /**
     * @return void
     * @author renshangyi
     * @date 2021/11/17
     * @Description 储值车无配置自动开闸
     */
    @Override
    public void EntranceStoredNoConfig(String serialNo, String plateNo) {
        String str = "储值车," + plateNo + ",欢迎光临";
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "储值车"+plateNo, LedConstant.qyTwoLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "欢迎光临", LedConstant.qyOneLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, str);
        sdkCallInterface.SdkUnfoldAll(JddConstant.SdkOpenGateLog.SWICH_TYPE_ONE, serialNo, plateNo);
    }

    /**
     * @param serialNo
     * @return
     * @Description 临时车入场播报
     * @author renshangyi
     * @Date 2021-11-17
     */
    @Override
    public void TemporaryEntrance(String serialNo, String plateNo) {
        String str = "临时车," + plateNo + ",欢迎光临";
        sdkCallInterface.SdkUnfoldAll(JddConstant.SdkOpenGateLog.SWICH_TYPE_ONE, serialNo, plateNo);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "临时车"+plateNo, LedConstant.qyTwoLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "欢迎光临", LedConstant.qyOneLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, str);
    }

    /**
     * @param serialNo
     * @return
     * @Description 临时车禁止入场播报
     * @author renshangyi
     * @Date 2021-11-17
     */
    @Override
    public void TemporaryBanEntrance(String serialNo,String plateNo) {
        String str =sdkCallInterface.getOverdueType(plateNo)+ "临时车辆,禁止入场";
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, str, LedConstant.qyTwoLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, str);
    }

    /**
     * @param serialNo
     * @return
     * @Description 临时车入场车位已满, 禁止通行播报
     * @author renshangyi
     * @Date 2021-11-17
     */
    @Override
    public void TemporaryEntranceParkingFull(String serialNo, String plateNo) {
        String str =  sdkCallInterface.getOverdueType(plateNo)+"临时车位已满,禁止入场";
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, str, LedConstant.qyTwoLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, plateNo, LedConstant.qyOneLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, str);
    }

    /**
     * 临时车位已满 确认开闸
     *
     * @param serialNo
     * @param plateNo
     * @return void
     * @author renshangyi
     * @date 2021/11/17
     * @version 1.0
     */
    @Override
    public void TemporaryEntranceFullConfirmOpened(String serialNo, String plateNo) {
        String str = sdkCallInterface.getOverdueType(plateNo)+"临时车位已满,请等待确认放行";
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, str, LedConstant.qyTwoLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, plateNo, LedConstant.qyOneLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, str);
    }

    /**
     * @return void
     * @author renshangyi
     * @date 2021/11/17
     * @Description 临时车位未满配置自动开闸
     */
    @Override
    public void TemporaryEntranceInConfig(String serialNo, String plateNo) {
        String str = sdkCallInterface.getOverdueType(plateNo);
        if (StringUtils.isBlank(str)){
            str = "临时车,"+plateNo+",欢迎光临";
        }
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, str, LedConstant.qyTwoLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "欢迎光临", LedConstant.qyOneLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, str);
        sdkCallInterface.SdkUnfoldAll(JddConstant.SdkOpenGateLog.SWICH_TYPE_ONE, serialNo, plateNo);
    }

    /**
     * @return void
     * @author renshangyi
     * @date 2021/11/17
     * @Description 临时车位未满配置确认开闸
     */
    @Override
    public void TemporaryInConfig(String serialNo, String plateNo) {
        String str =sdkCallInterface.getOverdueType(plateNo)+ "临时车,请等待确认放行";
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, str, LedConstant.qyTwoLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, plateNo, LedConstant.qyOneLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, str);
    }

    /**
     * @author renshangyi
     * @date 2021/11/17
     * @Description 无牌车出场
     */
    @Override
    public void OutUnlicensed(String serialNo) {
        String str = "无牌车,扫码支付";
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, str, LedConstant.qyTwoLine);
        String threeLineStr = "无牌车";
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, threeLineStr, LedConstant.qyOneLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, str);
    }

    /**
     * @author renshangyi
     * @date 2021/11/17
     * @Description 特殊车出场
     */
    @Override
    public void OutSpecial(String serialNo, String plateNo) {
        //直接抬杆
        sdkCallInterface.SdkUnfoldAll(JddConstant.SdkOpenGateLog.SWICH_TYPE_ONE, serialNo, plateNo);
        String str = plateNo + ",祝您一路顺风";
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, str, LedConstant.qyTwoLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, plateNo, LedConstant.qyOneLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, str);
    }

    /**
     * @author renshangyi
     * @date 2021/11/17
     * @Description 白名单出场
     */
    @Override
    public void OutParkWhite(String serialNo, String plateNo) {
        sdkCallInterface.SdkUnfoldAll(JddConstant.SdkOpenGateLog.SWICH_TYPE_ONE, serialNo, plateNo);
        String str = plateNo + ",祝您一路顺风";
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, str, LedConstant.qyTwoLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, plateNo, LedConstant.qyOneLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, str);

    }

    /**
     * @author renshangyi
     * @date 2021/11/17
     * @Description 月租车出场（不启用）
     */
    @Override
    public void OutMonthly(String serialNo, String plateNo) {
        // 直接抬杆
        sdkCallInterface.SdkUnfoldAll(JddConstant.SdkOpenGateLog.SWICH_TYPE_ONE, serialNo, plateNo);
        String str = plateNo + ",祝您一路顺风";
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, str, LedConstant.qyTwoLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, plateNo, LedConstant.qyOneLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, str);

    }

    /**
     * @author renshangyi
     * @date 2021/11/17
     * @Description 调用计费规则异常处理
     */
    @Override
    public void OutAbnormal(String serialNo, String plateNo) {
        String str = "车辆匹配异常";
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, str, LedConstant.qyTwoLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, plateNo, LedConstant.qyOneLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, str);
    }

    /**
     * @author renshangyi
     * @date 2021/11/17
     * @Description 无异常 无入场记录不抬杆
     */
    @Override
    public void OutAbnormalBan(String serialNo, String plateNo) {
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, JddConstant.AdmissionRecordsCarType.NO_OPEN_MESSAGE, LedConstant.qyTwoLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, plateNo, LedConstant.qyOneLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, "临时车无入场记录");

    }

    /**
     * @author renshangyi
     * @date 2021/11/17
     * @Description 无异常 无入场记录免费放行
     */
    @Override
    public void OutAbnormalCan(String serialNo, String plateNo) {
        sdkCallInterface.SdkUnfoldAll(JddConstant.SdkOpenGateLog.SWICH_TYPE_ONE, serialNo, plateNo);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, JddConstant.AdmissionRecordsCarType.FREE_RELEASE_MESSAGE, LedConstant.qyTwoLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, plateNo, LedConstant.qyOneLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, plateNo + ",祝您一路顺风");

    }

    /**
     * @author renshangyi
     * @date 2021/11/17
     * @Description 停车费已支付处理
     */
    @Override
    public void OutPayParkingFee(String serialNo, String plateNo) {
        //直接抬杆
        String str = plateNo + ",祝您一路顺风";
        sdkCallInterface.SdkUnfoldAll(JddConstant.SdkOpenGateLog.SWICH_TYPE_ONE, serialNo, plateNo);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, str, LedConstant.qyTwoLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, plateNo, LedConstant.qyOneLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, str);
    }

    /**
     * @author renshangyi
     * @date 2021/11/17
     * @Description 使用免费时长券/全免券/小时券的订单
     */
    @Override
    public void OutDiscount(String serialNo, String plateNo, DiscountCouponDetail discountCouponDetail) {
        //直接抬杆
        sdkCallInterface.SdkUnfoldAll(JddConstant.SdkOpenGateLog.SWICH_TYPE_ONE, serialNo, plateNo);
        String str = plateNo + ",祝您一路顺风";
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, str);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "使用" + discountCouponDetail.getCouponName(), LedConstant.qyTwoLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, plateNo, LedConstant.qyOneLine);
    }

    /**
     * @author renshangyi
     * @date 2021/11/17
     * @Description 储值车无入场纪录
     */
    @Override
    public void OutStoredNoInLogs(String serialNo, String plateNo) {
        String str = "临时车无入场记录";
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, str, LedConstant.qyTwoLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, plateNo, LedConstant.qyOneLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, str);
    }

    /**
     * @author renshangyi
     * @date 2021/11/17
     * @Description 储值车缴费出场
     */
    @Override
    public void OutStoredPayFee(String serialNo, String plateNo, Integer unpayFee, Integer remaining, ParkOrderInfoVO parkOrderInfoVO) {
        String strVoice = "储值车," + plateNo + ",停车时长" + DateUtils.qianyiTurnDayHourMinuteString(String.valueOf(parkOrderInfoVO.getChargeDuration()))
                + ",收费" + unpayFee + "元" + ",剩余金额" + remaining + "元";
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "停车时长:"+DateUtils.turnDayHourMinuteString(String.valueOf(parkOrderInfoVO.getChargeDuration()))+",收费:"+unpayFee + "元"+",余额"+remaining+"元", LedConstant.qyTwoLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, plateNo, LedConstant.qyOneLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, strVoice);
        sdkCallInterface.SdkUnfoldAll(JddConstant.SdkOpenGateLog.SWICH_TYPE_ONE, serialNo, plateNo);
    }

    /**
     * @author renshangyi
     * @date 2021/11/17
     * @Description 调用计费规则异常处理
     */
    @Override
    public void OutStoredChargeAbnormal(String serialNo, String plateNo) {
        String str = "车辆匹配异常";
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, str, LedConstant.qyTwoLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, str);
    }

    /**
     * @author renshangyi
     * @date 2021/11/17
     * @Description 播报收费信息
     */
    @Override
    public void OutShowFee(String serialNo, String plateNo, ParkOrderInfoVO parkOrderInfo) {
        //播报文字
        String voiceStr = parkOrderInfo.getPlateNo() + ",收费" + Integer.parseInt(parkOrderInfo.getChargeUnpaid()) / 100 + "元" +
                ",停车时长" + DateUtils.qianyiTurnDayHourMinuteString(String.valueOf(parkOrderInfo.getChargeDuration()));
        String chargeStr = "停车时长:"+DateUtils.turnDayHourMinuteString(String.valueOf(parkOrderInfo.getChargeDuration()))+",收费:"+Integer.parseInt(parkOrderInfo.getChargeUnpaid()) / 100 + "元";
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, chargeStr, LedConstant.qyTwoLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, plateNo, LedConstant.qyOneLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, voiceStr);
    }

    /**
     * 入场 确认开闸被拒绝
     *
     * @param serialNo
     * @param plateNo
     * @return void
     * @author renshangyi
     * @date 2021/11/17
     * @version 1.0
     */
    @Override
    public void RefuseCarEnter(String serialNo, String plateNo) {
        String str = "禁止入场,请与管理员联系";
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, str, LedConstant.qyTwoLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, str);
    }
    /*** 功能描述: 场内码支付成功得，加上去缴费成功
     * @Author: lcy
     * @Date: 2022/1/19
     */
    @Override
    public void FieldFee(String serialNo, String plateNo) {
        //直接抬杆
        String str = plateNo + ",缴费成功,祝您一路顺风";
        sdkCallInterface.SdkUnfoldAll(JddConstant.SdkOpenGateLog.SWICH_TYPE_ONE, serialNo, plateNo);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, str, LedConstant.qyTwoLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, plateNo, LedConstant.qyOneLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, str);
    }

    /**
     * 重复入场
     */
    @Override
    public void repeatRecognitionConfirmOpened(String serialNo, String plateNo) {
        String str = plateNo+"重复入场";
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, str, LedConstant.qyTwoLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, plateNo, LedConstant.qyOneLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, str);
    }

    /**
     * 月租车出场 播报收费信息
     * @param serialNo
     * @param plateNo
     * @param broadcastInfo
     * @return
     * @author renshangyi
     * @date 2022/4/1
     */
    @Override
    public void OutMonthlyShowFee(String serialNo, String plateNo, String broadcastInfo) {
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, broadcastInfo, LedConstant.qyTwoLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, plateNo, LedConstant.qyOneLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, broadcastInfo);
    }

    /**
     * 临时车不收费出场
     * @param serialNo
     * @param plateNo
     */
    @Override
    public void FieldFeeOut(String serialNo, String plateNo) {
        sdkCallInterface.SdkUnfoldAll(JddConstant.SdkOpenGateLog.SWICH_TYPE_ONE, serialNo, plateNo);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "祝您一路顺风", LedConstant.qyTwoLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, plateNo, LedConstant.qyOneLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, plateNo+",一路顺风");
    }
}
